package com.yxx.controller.user;

import com.yxx.medicinecommon.result.ResponseResult;
import com.yxx.medicinepojo.entity.Employee;
import com.yxx.service.EmployeeService;
import com.yxx.service.ShoppingCartService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.transform.Result;
import javax.xml.ws.Response;

/**
 * @author yuxiangxun
 * @date 2024/9/23
 * @apiNote
 */
@RestController("userShopController")
@Slf4j
@Api(tags = "营业状态接口")
@RequestMapping("/user/shop")
public class ShopController {

    @Autowired
    private EmployeeService employeeService;

    @GetMapping("/status")
    @ApiOperation("查看店铺营业状态")
    public ResponseResult<Integer> selectShopStatus(){
        //先写死 开业状态
        Integer status = Math.toIntExact(Long.valueOf(1));
        return ResponseResult.success(status);
    }

    @GetMapping("getMerchantInfo")
    @ApiOperation("获取店铺电话信息")
    public ResponseResult<String> getMerchantInfo(){
        Employee employee = employeeService.select_Employee_id((long) 1);
        String phone = employee.getPhone();
        return ResponseResult.success(phone);
    }


}
